from django.urls import path
from rest_framework.routers import DefaultRouter

from . import views

router = DefaultRouter(trailing_slash=False)
router.register('merchant', views.MerchantViewSet, basename='merchant')
router.register('address', views.AddressViewSet, basename='address')

app_name = 'smsCode'

urlpatterns = [
                  path('smscode/', views.SmsCodeView.as_view(), name='sms_code'),
                  path('login', views.LoginView.as_view(), name='login'),
                  path('search', views.MerchantSearchView.as_view(), name='search'),
                  path('category/merchant/<int:merchant_id>', views.CategoryView.as_view(), name='category')
              ] + router.urls
